package com.example.memento.model.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

/**
 * 下载任务表定义
 * 用于MyBatis-Flex类型安全查询
 */
public class DownloadTaskTableDef extends TableDef {

    public static final DownloadTaskTableDef DOWNLOAD_TASK = new DownloadTaskTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");
    public final QueryColumn TASK_ID = new QueryColumn(this, "task_id");
    public final QueryColumn SOURCE_NAME = new QueryColumn(this, "source_name");
    public final QueryColumn URL = new QueryColumn(this, "url");
    public final QueryColumn STATUS = new QueryColumn(this, "status");
    public final QueryColumn DOWNLOADED_BYTES = new QueryColumn(this, "downloaded_bytes");
    public final QueryColumn TOTAL_BYTES = new QueryColumn(this, "total_bytes");
    public final QueryColumn ERROR_MESSAGE = new QueryColumn(this, "error_message");
    public final QueryColumn START_TIME = new QueryColumn(this, "start_time");
    public final QueryColumn END_TIME = new QueryColumn(this, "end_time");
    public final QueryColumn LOCAL_PATH = new QueryColumn(this, "local_path");
    public final QueryColumn CREATED_AT = new QueryColumn(this, "created_at");
    public final QueryColumn UPDATED_AT = new QueryColumn(this, "updated_at");

    public DownloadTaskTableDef() {
        super("", "download_tasks");
    }

    public DownloadTaskTableDef(String schema, String name) {
        super(schema, name);
    }

    public DownloadTaskTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }
}
